/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package button_tools;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;

/**
 *
 * @author tnull
 */
public class TCircle extends TShape {

    public TCircle(Color c, int x, int y, int w, int h) {
        super(c, x, y, w, h);
        this.setType(SHAPE_TYPE.CIRCLE);
    }

    @Override
    protected void draw(Graphics2D g2d) {
        g2d.setColor(m_Color);
        if (m_Filled) {
            g2d.fill(new Ellipse2D.Double(m_x, m_y, m_width-m_x, m_height-m_y));

        } else {
            g2d.draw(new Ellipse2D.Double(m_x, m_y, m_width-m_x, m_height-m_y));
            
        }
    }
}
